<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head><title>Lista Hotel</title></h:head>
<h:body>
<h:form>
	<input type="hidden" name="idh" value="#{aggiornamento.pacchetto.getGiornata(aggiornamento.numeroGiornata).trasporto.volo.luogoArrivo}"/>
    <p:dataTable id="dataTable" var="list" value="#{aggiornamento.listaVoloPerSceltaUtente()}" widgetVar="hotelTable"   
            emptyMessage="Nessun Volo Trovato" filteredValue="#{ProdottiBase.selectedVolo}">  
           
        <p:column id="orarioColumn" filterBy="orarioPartenza"   
                headerText="Nome" footerText="contains"  
                filterMatchMode="contains">  
            <h:outputText value="#{list.orarioPartenza}" />  
        </p:column>  

        <p:column id="luogoPartenzaColumn" filterBy="luogoPartenza"   
                headerText="Partenza" footerText="contains"  
                filterMatchMode="contains">  
            <h:outputText value="#{list.luogoPartenza}" />  
        </p:column>
        <p:column id="luogoArrivoColumn" filterBy="luogoArrivo"   
                headerText="Arrivo" footerText="contains"  
                filterMatchMode="contains">  
            <h:outputText value="#{list.luogoArrivo}" />  
        </p:column>  
        <p:column id="costoColumn" filterBy="costo"   
                headerText="Costo" footerText="contains"  
                filterMatchMode="contains">  
            <h:outputText value="#{list.costo}" />  
        </p:column>  
	  <p:column>
	   <p:commandButton type="submit" id="create" value="Cambia Volo" action="#{aggiornamento.cambiaVolo(list)}"/>
	  </p:column>
	</p:dataTable>
</h:form>

</h:body>
</html>